import Taro, { Component } from '@tarojs/taro'
import { } from '@tarojs/components'
import EvoWaveLoading from '../../components/evo-wave-loading'

interface ChapterProps { }
interface ChapterState { 
    isShowLoading: boolean
}

export default class Chapter extends Component<ChapterProps, ChapterState> {

    constructor(props: ChapterProps) {
        super(props)
        this.state = {
            isShowLoading: true
        }
    }

    render() {
        return (
            <EvoWaveLoading
                isShowed={this.state.isShowLoading}
                isLandscape={false}
                isShowText={true}
                width={240}
                height={240}
                percent={100}
                speed={0.5}
                fontSize={26}
                color='#00D1E5'
                fontColor='#FFFFFF'
                onLoadCompleted={this.handleLoadCompleted}
            />
        )
    }

    handleLoadCompleted = () => {
        this.setState({
            isShowLoading: false
        })
    }
}
